package cn.bupt.data
{
	import flash.events.Event;
	import flash.media.Video;
	
	import spark.components.Button;
	

	public class PinPoint extends Event{
		public static const PIN:String = "PIN";
		public var _button:Button = new Button;
		public var _number:int = 0;
		public var x:int = 0;
		public var y:int = 0;
		public function PinPoint(type:String,x:Number,y:Number,number:int){
			_button.x = x;
			_button.y = y;
/*			_button.width = 10;
			_button.height = 10;*/
			_button.visible = true;
			this._number = number;
			super(type);
		}
		public function setVisible(flag:Boolean):void{
			_button.visible = flag;
		}
		public function get button():Button{
			return _button;
		}
		public function set button(button_:Button):void{
			_button = button_;
			trace('btn visible : '+_button.id+_button.visible);
		}
		public function get number():int{
			return _number;
		}
		override public function clone():Event{
			return new PinPoint(type,_button.x,_button.y,0);
		}
		
		override public function toString():String{
			return formatToString("PinPoint");
		}
	}
}